package com.pine.app.module.security.oauth.provider.token.converter;

import com.pine.app.module.security.oauth.provider.token.OAuth2AccessToken;
import com.pine.app.module.security.oauth.provider.OAuth2Authentication;

import java.util.Map;

/**
 * @author xiaoyuan
 * @create 2020/3/10
 **/
public interface AccessTokenConverter {

    String AUD = "aud";
    String CLIENT_ID = "client_id";
    String EXP = "exp";
    String JTI = "jti";
    String GRANT_TYPE = "grant_type";
    String ATI = "ati";
    String SCOPE = "scope";
    String AUTHORITIES = "authorities";

    Map<String, ?> convertAccessToken(OAuth2AccessToken var1, OAuth2Authentication var2);

    OAuth2AccessToken extractAccessToken(String var1, Map<String, ?> var2);

    OAuth2Authentication extractAuthentication(Map<String, ?> var1);
}
